// 频道的相关操作

import { getUserChannels } from '@/api/channels'

export default {
  // namespaced: true,
  state: {
    channelList: []
  },
  mutations: {
    setChannelList(state, payload) {
      state.channelList = payload
    }
  },
  actions: {
    async actions_getChannelList(context) {
      const res = await getUserChannels()
      // console.log(res)
      context.commit('setChannelList', res.data.channels)
    }
  },
  getters: {}
}
